<div class="box span12">
	<div class="box-header">
		<h2><i class="icon-th-list"></i><?php echo Yii::t("main","Danh sách mẫu email của tôi");?></h2>
	</div>
	<div class="box-content">
		<div class="btn-group pull-right">
			<a href="<?php echo Yii::app()->createUrl('templates/myTemplate/create');?>" class="btn btn-large btn-success"><i class="icon-plus"></i>&nbsp;<?php echo Yii::t("main","Tạo mới");?></a>
			&nbsp;&nbsp;<a href="<?php echo Yii::app()->createUrl('templates/myTemplate/createFromSystem');?>" class="btn btn-large btn-info"><i class=" icon-list-alt"></i>&nbsp;<?php echo Yii::t("main","Từ mẫu mail có sẵn");?></a>
			&nbsp;&nbsp;<a href="<?php echo Yii::app()->createUrl('templates/myTemplate/importHtml');?>" class="btn btn-large btn-warning"><i class="icon-file-alt"></i>&nbsp;<?php echo Yii::t("main","Nhập từ file");?></a>
		</div>
		<div class="clearfix"></div>
		<hr>
		<?php
		if($model->count() > 0){
		    $this->widget('zii.widgets.grid.CGridView', array(
		        'id'=>'template-grid',
		        'dataProvider'=> $model->search(),
		        // 'filter'=>$circle,
		        'loadingCssClass' => 'grid-loading',
		        'columns'=>array(
			    	array(
			    		'header' => Yii::t('main', 'STT'),
			            'class'=>'IndexColumnGrid',
			            'htmlOptions' => array(
			            	'class' => 'index-column-grid'
			            )
			        ),
		            array(
		                'name' => 'name',
			            'htmlOptions' => array(
			            	'style' => 'width: 100px;padding-left:10px;'
			            )
		             ),
		            array(
		                'name' => 'description',
			            'htmlOptions' => array(
			            	'style' => 'width: 200px;padding-left:10px;'
			            )
		            ),
		            array(
		            	'class' => 'ButtonColumn'
		            )
		        ),
		    ));
		}else{?>
			<div class="no-item">
				<i class="no-item-icon icon-road"></i>
				<div class="clearfix"></div>
				<h2><?php echo Yii::t("main","Chưa có mẫu email nào");?></h2>
			</div>
		<?php }?>
	</div>	
</div><!--/span-->
